package com.common;

import org.openqa.selenium.edge.EdgeDriver;

import java.time.Duration;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Lenovo
 * Date: 2022-11-16
 * Time: 14:11
 */
//建立浏览器驱动
public class commonDriver {
    private static EdgeDriver edgeDriver;

    public static EdgeDriver getDriver(){
        if(edgeDriver == null){
            edgeDriver = new EdgeDriver();

            //添加隐式等待
            edgeDriver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
        }

        return edgeDriver;
    }



}
